<?php
/**
 * Eren Framework
 * 
 * Define the Interface of Cache Class
 * 
 * @category System
 * @author Manu Soros Leu
 * @copyright manusoros@gmail.com
 */

abstract class Eren_Cache_Abstract
{
        
    /**
     * Get value from Cache
     * 
     * @param string $key
     * @param string|int $default
     * @throws Eren_Cache_Exception
     * @return string|int..
     */
    abstract public function get($key, $default);
    
    /**
     * Set value into Cache
     * 
     * @param string $key
     * @param string|int $value
     * @param int $expireTime  seconds
     * @throws Eren_Cache_Exception
     * @return bool
     */
    abstract public function set($key, $value, $expireTime);
    
    /**
     * Clean cache by Key
     * 
     * @param string $key
     * @throws Eren_Cache_Exception
     * @return bool
     */
    abstract public function clean($key);
}